<template>
  <div class="boxbox">
    <div class="hello">

      <el-button class="num1">
        企业名称
        <el-icon>
          <ArrowDown />
        </el-icon></el-button>
      <el-input v-model="input" class="w-50 m-2" placeholder="请输入需要查询的核心企业名称" :prefix-icon="Search" />
      <el-select v-model="value" class="m-2" placeholder="全部" size="small">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
      </el-select>
      <el-button class="cha" type="primary" @click="chaxun(value)">查询</el-button>
      <el-button class="chong" @click="chongzhi()">重置</el-button>
    </div>

    <div class="weiba">
      <el-table class="tou" :data="Parameters" stripe style="width:100%; ">
        <el-table-column prop="" label="序号">
          <template #default="scope">

            <span>{{ scope.$index + 1 }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="entEntname" label="企业名称">
          <template #default="scope">

          </template>
        </el-table-column>
        <el-table-column prop="entCreditcode" label="社会信用代码">
          <template #default="scope">

          </template>
        </el-table-column>
        <el-table-column prop="entEntloantotal" label="注册资本">

        </el-table-column>
        <el-table-column prop="caCreditpermsgtext" label="业务员">

        </el-table-column>
        <el-table-column prop="" label="流程状态">

        </el-table-column>
        <el-table-column prop="" label="任务开始时间">

        </el-table-column>
        <el-table-column prop="" label="操作">

          <template #default="scope">
            <el-button class="on" @click="fun">
              <img src="../../assets/gjc01.svg" alt="">
              <img class="thre" src="../../assets/gjc03.svg" alt="">
            </el-button>
            <el-button class="two">
              <img class="two" src="../../assets/gjc02.svg" alt="">
            </el-button>

          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
  <Tan v-if="boolobox" class="chuu"></Tan>
</template>

<script setup>
import serviceAxios from '@/apis/index'
import { onMounted, ref } from 'vue'
import { Search } from '@element-plus/icons-vue'
import Tan from './Tan.vue'
import { useRouter } from 'vue-router'

var router = useRouter();
const input = ref()
const Parameters = ref();

//获取列表
onMounted(
  async () => {
    var res = await serviceAxios.gjc.My_entUpdownent();

    Parameters.value = res.data.data


  })

//查寻
var chaxun = async(value) => {
  var res = await serviceAxios.gjc.My_entUpdownentcha({entEntname:input.value});
  Parameters.value = res.data.data
}
//重置
var chongzhi =async()=>{
    var res = await serviceAxios.gjc.My_entUpdownent();
    Parameters.value = res.data.data
}
var fun = () => {
  router.push('/home/upandown/Tan');
};

</script>

<style scoped>
.boxbox {
  width: 100%;
  height: 100%;
  background-color: #fafafa;
}

.boxbox .top {
  width: 180px;
  height: 28px;
  background-color: rgba(75, 167, 254, 1);
  border-radius: 25px;
}

.boxbox .top p {
  line-height: 28px;
  text-align: center;
  font-weight: bold;
  color: white;
}

.hello {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
}

.hello .num1 {
  border: none;
  width: 80px;
  height: 28px;
  font-size: 12px;
  font-weight: 200;
  margin-left: 50px;
  margin-right: 20px;
}

.hello .el-input {
  width: 250px;
  height: 28px;
  font-size: 12px;
  font-weight: 200;
  margin-right: 20px;
}

.hello .el-select {
  margin-top: 3px;
  width: 80px;
  height: 28px;
  margin-right: 20px;
}

.hello .cha {
  width: 50px;
  height: 28px;
  font-size: 12px;
  /* margin-right: 20px; */
}

.hello .chong {
  width: 50px;
  height: 28px;
  font-size: 12px;
  font-weight: 200;
}

.weiba {
  width: 80%;
  margin: auto;
  font-size: 12px;
}

.beiba .on {
  position: relative;
}

.weiba .thre {
  position: absolute;
  left: 20px;
  /* top: 10px; */
}

:deep(.el-table td.el-table__cell div) {
  display: flex;
  margin-left: -10px;

}

.weiba .el-button {
  border: none;
}

.chuu {
  position: absolute;
  z-index: 10;
  top: 70px;
  left: 230px;
}</style>